﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MagicBox
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private MainViewModel viewModel;

        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = viewModel = new MainViewModel();
        }

        private void bSelectFileFrom_Click(object sender, RoutedEventArgs e)
        {
            viewModel.SelectFile(true);
        }

        private void bSelectFileTo_Click(object sender, RoutedEventArgs e)
        {
            viewModel.SelectFile(false);
        }

        private void bToBase64_Click(object sender, RoutedEventArgs e)
        {
            viewModel.ConvertToBase64();
        }

        private void bToBinary_Click(object sender, RoutedEventArgs e)
        {
            viewModel.ConvertToBinary();
        }
    }
}
